package cn.cmcc.online.smsapi.ui.manager;

import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;

import org.json.JSONArray;
import org.json.JSONObject;

import cn.cmcc.online.smsapi.ui.model.ActionData;
import cn.cmcc.online.smsapi.ui.model.FlightData;
import cn.cmcc.online.smsapi.ui.model.TrainData;
import cn.cmcc.online.smsapi.ui.web.IActivityForWebView;
import cn.cmcc.online.smsapi.ui.web.IActivityParamForJS;

public interface IDataExchange {
    void processAction(Context activityContext, ActionData action);

    void setTrainInfoListener(IDataCallback<JSONObject> callback);

    void getTrainInfo(TrainData data);

    void getFlightInfo(FlightData data, IDataCallback<FlightData> callback);

    void getMetaInfo(JSONObject data, IDataCallback<JSONObject> callback);

    void updateCardInfo(JSONObject data);

    BitmapDrawable getBitmap(String path);

    //获取webViewJSManager类
    IActivityParamForJS getJSManager(IActivityForWebView activityForWebView);

    //获取网络开关
    boolean geOnOffByType(int type);

    //TODO OnlineUpdateCycleConfig我不知道
    JSONArray getConfigByType(int type, String uiversion, Integer suportMenuId);

    //获取网络类型
    int checkNetWork(Context context, int type);

    void openMap(Context context, String name, String address, Double longitude, Double latitude);

    void getLocation(Context context, Handler handler);
}
